package cn.sccl.dirms.topo.util;

import java.net.InetAddress;

/**
 * Created by liuchuan on 12/23/16.
 */
public class PingUtil {

    /**
     *
     * @param host 主机地址
     *
     * @return boolean
     * */
    public static boolean ping(String host) {
        try
        {
            InetAddress address = InetAddress.getByName(host);
            return address.isReachable(3000);
        } catch (Exception e) {
            e.printStackTrace();
            return false;
        }
    }
}
